import request from '@/utils/request'
const BASE_URL = '/apis'

export function login(username, password) {
  return request({
    url: BASE_URL + '/api/v1/authorization/token',
    method: 'post',
    data: {
      username,
      password
    }
  })
}

export function getInfo() {
  return request({
    url: BASE_URL + '/api/v1/authorization/user_info',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: BASE_URL + '/api/v1/authorization/token',
    method: 'delete'
  })
}
